package course.d1222;

public class p3 {
    public static void main(String[] args) {

        print(null);
    }
    public static void print(String s ){
        try {
            System.out.println(s.length());
            System.out.println("try--结束");
        }catch (NullPointerException e){
            System.out.println("空指针异常");
        }

            System.out.println("程序结束");

    }
}
